<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 300px;
            height: 300px;
            background: yellowgreen;
        }
    </style>
</head>

<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <div class="box" v-on:click="handle"></div>
        <p  v-on:click="handle1">我是一个段落</p>
        <p  @mouseleave="handle1" @mouseenter="handle1">
             鹅鹅鹅，曲项向天歌
        </p>
    </div>
</body>

</html>
<script>
    const VM = new Vue({
        el: '#app',
        data: {
            msg: '我爱你塞北的大雪'
        },
        
        methods: {
           
            handle() {
                
                this.msg = '我爱你豪哥';
            },
            handle1() {
                
                console.log('我是一个段落')
            }
           
        }
    });
    
    console.log(VM);
</script>